import java.util.Scanner;
import book.List.book;
import book.List.bookList;
import user.Administrator;
import user.Normal;
import user.User ;
/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:岁亮亮
 * Date:2024-01-08
 * TIME:20:04
 */
public class Main {
    public static User login(){
        System.out.println("请输入你的姓名");
        Scanner scanner=new Scanner(System.in);
        String name=scanner.nextLine();
        System.out.println("请选择自己的信息  1  管理员   2  普通用户");
        int choice=scanner.nextInt() ;

        if(choice==1){
            return new Administrator(name);
        }
        else{
            return new Normal(name);
        }
    }
    public static void main(String[] args) {
        bookList bookList=new bookList();//都是你的问题!!!!!!!!!!
        User user=login();
        while (true){
            int choice=user.menu();
            System.out.println("choice"+choice);
            user.Dooperation(choice,bookList);//不能是user.Dooperation(choice,new bookList())!!!!!!!!!记住了!@!!!
        }
}
}
